# -*- coding:utf-8 -*-
# __author__ : "张百科"
# Date: 2021/1/25 16:52
# File: experience.py
# IDE: PyCharm

from django_filters import rest_framework
from models.experience  import Experience
from utils.choices import experience_process_choices
import django_filters


class ExperienceFilter(rest_framework.FilterSet):
    process = django_filters.ChoiceFilter(field_name='process',choices=experience_process_choices)
    title = django_filters.CharFilter(field_name='title',lookup_expr='icontains')

    class Meta:
        model = Experience
        fields = ['process', 'title']